package com.zb.uniman.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.zb.uniman.model.Bank;
import com.zb.uniman.service.BankService;
import com.zb.uniman.mapper.BankMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.HashMap;
import java.util.List;

/**
* @author a1823
* @description 针对表【bank】的数据库操作Service实现
* @createDate 2023-11-27 18:40:38
*/
@Service
public class BankServiceImpl extends ServiceImpl<BankMapper, Bank>
    implements BankService{

    @Autowired
    private BankMapper bankMapper;
// 集合实现sql条件查询   SELECT id,bankname,phone FROM bank WHERE id IN ( ? , ? , ? )
    @Override
    public List<Bank> selectBybatchid(List<Integer> ids) {
        List<Bank> banks = bankMapper.selectBatchIds(ids);
        return banks;
    }
//集合实现sql多条件查询 SELECT id,bankname,phone FROM bank WHERE id =1 and bankname="建设银行";
    @Override
    public List<Bank> selectbyMap(HashMap hashMap) {
        List list = bankMapper.selectByMap(hashMap);
        return list;
    }

    @Override
    public String sayhi() {
        return "hi,Base class";
    }
}




